import Vue from 'vue'
import Router from 'vue-router'
import UserLayout from '@/components/UserLayout'

Vue.use(Router)

export default new Router({
  mode:'history',
  routes: [
    {
      path: '/test',
      name: 'test',
      component: () => import('@/components/TestLayout'),
    },
    {
      path: '/system',
      name: 'UserLayout',
      component: UserLayout,
      redirect: '/system/login',
      children:[
        {
          path: '/system/login',
          name: 'Login',
          component: () => import('@/components/user/Login'),
        }
      ]
    },
    {
      path: '/404',
      name: '404',
      component: () => import('@/components/404'),
    },
  ]
})
